<?php
namespace App\Http\Controllers\Member;

use App\Http\Controllers\Controller;

use Illuminate\Support\Facades\View;

class CommonController extends Controller
{
    public function __construct()
    {
        //parent::__construct();
        View::share('left_nav',self::getLeftNav());
    }
    protected static function getLeftNav(){
        $left_nav = [];
        $left_nav[] = [
            'id' => 'company',
            'name' => '云企',
            'icon' => '',
            'son_nav' => [
                'company_survey'  => [
                    'id' => 'company_survey',
                    'name' => '概况',
                    'url' => route('member.company.index'),
                ],
                'company_content'  => [
                    'id' => 'company_content',
                    'name' => '内容',
                    'url' => route('member.company.content'),
                ],
                'company_template'  => [
                    'id' => 'company_template',
                    'name' => '装修',
                    'url' => route('member.company.template'),
                ],
            ],
        ];
        $left_nav[] = [
            'id' => 'personal',
            'name' => '云友',
            'icon' => '',
            'son_nav' => [
                'personal_card' => [
                    'id' => 'personal_card',
                    'name' => '云名片',
                    'url' => route('member.personal.card'),
                ],
            ],
        ];
        return $left_nav;
    }

}
